import BaseCURDV2Api from '@/framework/infra/base/BaseCURDV2Api'

class MeasureApi extends BaseCURDV2Api {
  constructor() {
    super('pdt/measure')
  }

  listAll() {
    return this.get('list-all', { pageNo: 1, pageSize: 100 }).then(data => {
      return data.map(el => {
        return {
          label: el.title,
          value: el.content
        }
      })
    })
  }
}

export const measureApi = new MeasureApi()
